/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase2203 - For6
 * <p>Powered by webrx On 2022-07-14 11:37:07
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For6 {
    public static void main(String[] args) {
        int len = 20;
        for (int i = 1; i <= 21; i += 2) {
            for (int k = --len; k >= 0; k--) {
                System.out.print(" ");
            }
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        for (int i = 19; i >= 1; i -= 2) {
            for (int k = ++len; k >= 0; k--) {
                System.out.print(" ");
            }
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
